home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 13 / 013.d81 / label maker (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  87 lines

  1. 1 gosub500
  2. 10 diml$(5),e%(5):dv=4
  3. 15 printtchr$(9)chr$(142)chr$(8)"[147][144]align print head as shown"
  4. 20 print"[144]  [223][157][157]  [146] [157][157][157]  [146][212][157][212][145][156][192][192] label     [144]side[157][157][157][157]view"
  5. 25 print"[156] [221][157][202][192] print head"
  6. 30 print"[144]   [210][210][210][157][157][157][157][157][169][188][190][223][157][157][157]  "
  7. 35 print"[156][145][145][145][201][157][202][192] label"
  8. 37 print"  [202][192] print head  [145][145][144]top [157][157][157][157]view"
  9. 40 print"     push any key     ":gosub330
  10. 45 rem *** upper/lower case ***
  11. 50 print"[147]upper & lower case?"
  12. 55 gosub330:ifa$="y"thenc$=chr$(17):printchr$(9)chr$(14):goto65
  13. 60 c$=chr$(15):printchr$(142)
  14. 65 fori=1to5:l$(i)="":e%(i)=0:nexti
  15. 70 rem *** input label ***
  16. 75 fori=1to5
  17. 80 print"[147][144]you have a maximum of 5[146] rows with 33[146]"
  18. 82 print"charactors per row.":print"if the 1st character";
  19. 85 print" is '^' then the row   will be double width."
  20. 90 print"line #"i
  21. 95 print"  ";chr$(34);chr$(34);chr$(20);:ife%(i)thenprint"^";
  22. 100 printl$(i):print""
  23. 105 inputl$(i)
  24. 110 ifleft$(l$(i),1)="^"thene%(i)=1:l$(i)=right$(l$(i),len(l$(i))-1):goto125
  25. 112 ifleft$(l$(i),1)="^"thengoto120
  26. 115 e%(i)=0
  27. 120 iflen(l$(i))>33-e%(i)*16then80
  28. 125 nexti
  29. 130 rem *** center vertically ***
  30. 135 print"centered vertically?":gosub330:ifa$<>"y"then185
  31. 140 k=0:fori=1to5:ifl$(i)<>""theni=5:goto150
  32. 145 k=k+1
  33. 150 nexti
  34. 155 kk=0:fori=1to5:ifl$(6-i)<>""theni=5:goto165
  35. 160 kk=kk+1
  36. 165 nexti
  37. 170 ifk+1<kkthenfori=1tokk-k-2:forj=5to2step-1
  38. 172 ifk+1<kkthenl$(j)=l$(j-1):e%(j)=e%(j-1):nextj:l$(1)="":nexti
  39. 175 ifk>kkthenfori=1tok-kk-1:forj=1to4:l$(j)=l$(j+1)
  40. 177 ifk>kkthene%(j)=e%(j+1):nextj:l$(5)="":nexti
  41. 180 rem *** check label ***
  42. 185 print"[147]label check"
  43. 190 print"if the line is reversed, then it is     double  width letters."
  44. 195 fori=1to5:ife%(i)thenprint"[144]"i"[156]"l$(i):goto205
  45. 200 print"[144]"i"[146][156]"l$(i)
  46. 205 nexti
  47. 210 print"[144] is this label ok?"
  48. 215 gosub330:ifa$<>"y"then75
  49. 220 print"[147]how many would you like to print ":inputa$:n=val(a$):ifn<1then185
  50. 225 print"c[146]entered or l[146]eft justified?"
  51. 230 gosub330:ifa$="l"thench$="l":goto250
  52. 235 ifa$="c"thench$="c":goto265
  53. 240 goto230
  54. 245 rem *** left justify ***
  55. 250 k=1:fori=2to5:iflen(l$(i))>len(l$(k))thenk=i
  56. 255 nexti:a$="":fori=1toint((33-e%(k)*16-len(l$(k)))/2):a$=a$+" ":nexti
  57. 260 rem *** sent to printer ***
  58. 265 open4,4:if c$=chr$(17)then close4:open4,4,7
  59. 270 fork=1ton:print"lbl"k
  60. 275 getz$:ifz$=""then295
  61. 280 ifz$="q"thenclose4:goto180
  62. 285 print"push any key"
  63. 290 getz$:ifz$=""then290
  64. 291 ifz$="q"then280
  65. 292 print"            "
  66. 295 fori=1to5:print#dv,c$;:x$="":ife%(i)thenx$=chr$(14)
  67. 300 ifch$="l"thenprint#dv,c$+a$+x$+l$(i)+chr$(15):goto310
  68. 305 a$="":forj=1toint((33-e%(i)*16-len(l$(i)))/2)
  69. 307 a$=a$+" ":nextj:print#dv,c$+x$+a$+l$(i)+chr$(15)
  70. 310 nexti:print#dv,chr$(15)
  71. 315 nextk:close4
  72. 320 print"do you want to do some more labels?":gosub330:ifa$="y"then185
  73. 325 goto63000
  74. 330 geta$:ifa$=""then330
  75. 335 return
  76. 500 print"[147] do you have a printer?"
  77. 502 poke198,0:wait198,1:geta$:ifa$<>"y"anda$<>"n"thenpoke53280,rnd(1)*15:goto502
  78. 504 ifa$="y"thenreturn
  79. 506 :
  80. 510 print"[147]sorry...this program requires a printer."
  81. 520 fordl=1to2000:next:goto63100
  82. 530 :
  83. 63000 rem  connect back to l.s.
  84. 63010 :
  85. 63100 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
  86. 63102 poke631,13:poke632,13:poke198,2:end
  87.